package com.itheima.sh.Test;

import java.util.Arrays;

public class Test03_01 {
    public static void main(String[] args) {
        int[]arr={1,2,3,4,5,6,7};
        int []arr2=new int[arr.length];
        int start=0;
        int end=arr2.length-1;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i]%2==0){
                arr2[start]=arr[i];
                start++;
            }else {
                arr2[end]=arr[i];
                end--;
            }
        }
        System.out.println(Arrays.toString(arr2));
    }
}
